from datetime import datetime

# 获取当前日期和时间
current_datetime = datetime.now()

# 格式化为字符串
formatted_time = current_datetime.strftime("%Y-%m-%d %H:%M:%S")
print("格式化后的当前时间：", formatted_time)


# from selenium import webdriver
# from selenium.webdriver import ActionChains, Keys
#
# options = webdriver.ChromeOptions()
#
# options.page_load_strategy = "normal"  # 等待页面完全加载
# # 创建浏览器驱动对象
# driver = webdriver.Chrome(options=options)
# action = ActionChains(driver)
# url = r"https://www.baidu.com/"
# driver.get(url)
# for i in range(5):
#     action.send_keys(Keys.TAB).perform()
# action.key_down(Keys.ENTER).perform()
# input("按任意键关闭")
# # # 关闭驱动对象
# driver.close()
# driver.quit()
# print("结束")
